﻿function SaveCase() {
    CaseType = document.getElementById("divCaseTypeHidden").value;
    CaseIndex = document.getElementById("divCaseIndexHidden").value;

    CloseDate = document.getElementById("divCloseDate").value;
    CloseBy = document.getElementById("divCloseBy").value;
    ApprovedCloseBy = document.getElementById("divApprovedCloseBy").value;
    CloseSpecialNote = document.getElementById("divCloseSpecialNote").value;

    RetValue = Portal.Vision.CloseCase.ServerCloseCase(CaseType, CaseIndex, CloseDate, CloseBy, ApprovedCloseBy, CloseSpecialNote).value;
    if (RetValue.indexOf("ERROR") != -1) {
        alert(RetValue);
        return;
    }
    alert("Case đã được đóng thành công.");
    window.open(RetValue, "_self");
}
